//
//  YGTagView.m
//  AllYoga
//
//  Created by liwei on 2017/6/15.
//  Copyright © 2017年 biyunkeji. All rights reserved.
//

#import "YGTagView.h"

@interface YGTagView ()

@property (weak, nonatomic) IBOutlet UIButton *TagBtn;
@end

@implementation YGTagView

- (void)awakeFromNib {

    [super awakeFromNib];
    
    self.autoresizingMask = UIViewAutoresizingNone;
    
    [self.TagBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    [self.TagBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateSelected];
    
    self.TagBtn.userInteractionEnabled = NO;
}


- (void)setTagTitle:(NSString *)tagTitle {

    _tagTitle = tagTitle;
    
    [self.TagBtn setTitle:tagTitle forState:UIControlStateNormal];
}

- (void)setTagSelected:(BOOL)tagSelected {

    _tagSelected = tagSelected;
    
    self.TagBtn.selected = tagSelected;
    
    UIFont *textFont = tagSelected ? [UIFont systemFontOfSize:15] : [UIFont systemFontOfSize:12];
    self.TagBtn.titleLabel.font = textFont;
}


@end
